package com.work.game.home.ui.adapter;

import android.content.Context;

import java.util.List;

import com.work.game.R;
import com.work.game.refresh.baseadapter.CommonAdapter;
import com.work.game.refresh.baseadapter.ViewHolder;
import com.work.game.home.ui.model.RewardRecord;

public class RewardRecordAdapter extends CommonAdapter<RewardRecord> {
    public RewardRecordAdapter(Context context, List<RewardRecord> data, int layoutItemId) {
        super(context, layoutItemId, data);
    }

    @Override
    protected void convert(ViewHolder holder, RewardRecord rewardRecord, int position) {
        // 奖励来源类型 1签到 2激励视频
        holder.setText(R.id.tv_title, Integer.valueOf(rewardRecord.getRrSourceType()) == 1 ? "签到" : "激励视频");
        holder.setText(R.id.tv_content, "+" + rewardRecord.getRrMoney());
        holder.setText(R.id.tv_time, rewardRecord.getCreateTime());
    }
}
